package admin

import (
	"github.com/gin-gonic/gin"
	"go-admin/src/service"
	"net/http"
)

func GETLogin(c *gin.Context){
	c.HTML(http.StatusOK, "posts/index.tmpl", gin.H{
		"title": "Users",
	})
	//id:=c.Params().Get("id")
   // c.View("admin/index.html")

}
func POSTLogin(c *gin.Context){
	//注册传递参数，用户名，邮箱，密码，重复密码

	service.Register(c.PostForm("username"),c.PostForm("email"),c.PostForm("password"),c.ClientIP())

}